browsing throwing error replaceAll is not a function